home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / c / tcclib.exe / TCCLIB.H < prev    next >
Encoding:
Text File  |  1990-02-08  |  9.5 KB  |  326 lines

  1. typedef struct {
  2.     char  *Item;
  3.     char  *Desc;
  4.     int    FuncKey;
  5.     int    (*func)( void );
  6. } MenuRec;
  7.  
  8. typedef struct {
  9.              char Name[9];
  10.              char Ext[4];
  11.              char Attribute;
  12.     unsigned int  Date;
  13.     unsigned int  Time;
  14.     unsigned long Size;
  15.              int  Tag;
  16. } FileStruc;
  17.  
  18. typedef struct {
  19.     int   x;
  20.     int   y;
  21.     int   Len;
  22.     int   Type;
  23.     char *Address;
  24.     int   EditFlag;
  25.     int   NumDecimals;
  26. } FieldStruc;
  27.  
  28. typedef struct {
  29.     char Name[13];
  30. } FileNameStruc;
  31.  
  32. extern unsigned char attrib;
  33. extern unsigned char A_REVERSE;
  34. extern unsigned char A_NORMAL;
  35.  
  36. #define F_PTR  0
  37. #define F_INT  1
  38. #define F_INT0 2
  39. #define F_CHAR 3
  40. #define F_LNG  4
  41. #define F_LNG0 5
  42. #define F_DBL  6
  43. #define F_DATE 7
  44. #define F_BLN  8
  45. #define F_FLT  10
  46.  
  47. #define UnsFar unsigned char far
  48.  
  49. void       Accept( int x, int y, char *Prompt, char *Buffer, int Length );
  50. int        AllBlanks( register char *cp );
  51. void       AtSay( int col, int row, register char *cp );
  52. void       AtSayA( int col, int row, unsigned char attrib, register char *cp );
  53. void       AtSayF( int col, int row, char *fmt, ... );
  54. void       AtSayFA( int col, int row, unsigned char attrib, char *fmt, ... );
  55. void       Beep( void );
  56. unsigned   Bit( int x );
  57. void       BlockErase( int x, int y, int xx, int yy );
  58. void       CapsLock( int flag );
  59. void       Center( int y, char *s );
  60. void       CenterA( int y, unsigned char attrib, char *s );
  61. void       CenterF( int y, char *fmt, ... );
  62. void       CenterFA( int y, unsigned char attrib, char *fmt, ... );
  63. void       ChangeBlock( int x, int y, int xx, int yy, char attrib );
  64. int        CheckPrn( void );
  65. char      *ClearBeg( register char *cp );
  66. void       ClearBuf( void );
  67. void       ClearCRLF( char *cp );
  68. char      *ClearEnd( register char *cp );
  69. void       ClearField( int x, int y, int len );
  70. int        CompareFileNames( FileNameStruc *A, FileNameStruc *B );
  71. int        CopyFile( char *src, char *dest );
  72. UnsFar    *CurrentPos( void );
  73. void       CursorOff( void );
  74. void       CursorOn( void );
  75. void       DrawBox( int x, int y, int xx, int yy );
  76. void       DrawBox1( int x, int y, int xx, int yy );
  77. int        Exists( char *filename );
  78. void       ExplodeBox( int x, int y, int xx, int yy );
  79. void       ExplodeBox1( int x, int y, int xx, int yy );
  80. char      *FileName( FileStruc *fp );
  81. long       FileSize( char *filename );
  82. int        FindDown( FieldStruc *Field, int pos, int NUMFIELDS );
  83. int        FindLeft( FieldStruc *Field, int pos, int NUMFIELDS );
  84. int        FindRight( FieldStruc *Field, int pos, int NUMFIELDS );
  85. int        FindUp( FieldStruc *Field, int pos, int NUMFIELDS );
  86. int        GComm( void );
  87. void       GCommBackground( void (*funct)( void ) );
  88. int        GCommCheck( int Key );
  89. void       GCommLink ( int key, void (*funct)( void ) );
  90. void       GCommUnlink (int key);
  91. void       GetAllFields( FieldStruc *Field, int NUMFIELDS,
  92.            int (*ChHnd)( int ch ), void (*Update)( void ) );
  93. void       GetCursor( int *Top, int *Bottom );
  94. unsigned   GetDate( unsigned start_date );
  95. double     GetDouble( void );
  96. int        GetField( FieldStruc *Field );
  97. int        GetFieldA( int x, int y, int len, int type, char *address );
  98. char      *GetFile( int x, int y, int xx, int yy, char *Mask,
  99.            int FileAttrib, int ExtOn );
  100. int        GetInt( void );
  101. int        GetLine( char *ptr, int dsize, int start );
  102. long       GetLong( void );
  103. int        GetRec( int filehandle, void *buffer, int sizeofrec, long fileptr );
  104. void       GetScreen( char *buffer );
  105. int        GetVidMode( void );
  106. int        GetYN(char *s);
  107. void       HLin( int x, int y, int xx, int yy );
  108. void       HLin1( int x, int y, int xx, int yy );
  109. void       HideCursor( void );
  110. void       HorzMenu( MenuRec *MenuPtr, int NumChoices, int x, int y,
  111.            int xx, int yy );
  112. int        IsAT( void );
  113. int        IsCGA( void );
  114. int        IsEGA( void );
  115. int        IsMONO( void );
  116. unsigned   Julian( char *datestr );
  117. void       MakeBox( char *s );
  118. long       MaxRAM( void );
  119. void       NPrint( int num, char *cp );
  120. void       NPrintA( int num, int attrib, char *cp );
  121. void       NPrintF( int num, char *fmt, ... );
  122. void       NPrintFA( int num, int attrib, char *fmt, ... );
  123. void       NormalText( void );
  124. void       NumLock( int flag );
  125. void       OutChar( unsigned char c );
  126. void       OutCharA( unsigned char attrib, unsigned char c );
  127. void       PopCurpos( void );
  128. void       PopScreen( void );
  129. void       PushCurpos( void );
  130. int        PushScreen( void );
  131. void       PutCursor( int Top, int Bottom );
  132. void       PutDate( int x, int y, int format );
  133. void       PutField( FieldStruc *Field );
  134. void       PutFree( int x, int y, char *format );
  135. int        PutRec( int filehandle, void *buffer, int sizeofrec, long fileptr );
  136. void       PutScreen( char *buffer );
  137. void       PutTime( int x, int y, int format );
  138. void       RepChar( int times, unsigned char c );
  139. void       RepCharAttr( int times, unsigned char attrib, unsigned char c );
  140. char      *RevJul( unsigned date );
  141. void       ReverseText( void );
  142. void       Say( register char *cp );
  143. void       SayA( unsigned char attrib, register char *cp );
  144. void       SayF( char *fmt, ... );
  145. void       SayFA( char attrib ,char *fmt, ... );
  146. FileStruc *ScanDir( char *Mask, int Type );
  147. int        ScanTree( char *path, char *filespec, int (*FN)(FileStruc *f,
  148.            char *p) );
  149. int        ScrAttr( void );
  150. int        ScrChar( void );
  151. UnsFar    *ScrPtr( int col, int row );
  152. void       ScrollDown( int x, int y, int xx, int yy, int n );
  153. void       ScrollLock( int flag );
  154. void       ScrollMessage(char *msg);
  155. void       ScrollUp( int x, int y, int xx, int yy, int n );
  156. void       SetAttrib( char attribute  );
  157. void       SetVidMode( int mode );
  158. void       StrLeft( char *dest, char *src, int num );
  159. void       StrRight( char *dest, char *src, int num );
  160. void       StrRpl( char *string, int startpos, int num, char *replacestring );
  161. void       TcclibInitialize( void );
  162. double     TimeElapsed( void );
  163. void       TimerStart( void );
  164. unsigned   TodaysDate( void );
  165. void       VLin( int x, int y, int xx, int yy );
  166. void       VLin1( int x, int y, int xx, int yy );
  167. void       VertMenu( MenuRec MP[], int numchoices, int x, int y,
  168.            int xx, int yy );
  169. int        WeekDay( void );
  170. int        WindowLister( int x, int y, int xx, int yy, int CharToQuitOn,
  171.            int *NumItems, int NumToStartWith, int (*CharHandler)(int ch,
  172.            int Index), void (*ScreenClearer)( void ),
  173.            void (*DisplayLineFunction)(int Index) );
  174. void       XDrawBox( int x, int y, int xx, int yy );
  175. void       XDrawBox1( int x, int y, int xx, int yy );
  176.  
  177. char       getchf( char *list, char defchar );
  178. int        posneg( int num );
  179. int        select(char *menu[], int items, int x1, int y1, int x2);
  180. char      *strdel( char *string, int start, int num );
  181. char      *strins( char *string, int start, char *insstr );
  182. char      *stristr( char *string1, char *string2 );
  183. char      *strreplace(char *string, int start, int num, char *repstr );
  184. char      *strresize( char *string, int newlen );
  185. void       writevid( int x, int y, int x2, char *p, int attrib);
  186.  
  187.  
  188. #define BS 8
  189. #define FORMFEED 12
  190. #define CR 13
  191. #define LF 10
  192. #define ESC 27
  193. #define HOME 327
  194. #define END 335
  195. #define UP 328
  196. #define DOWN 336
  197. #define PGUP 329
  198. #define PGDN 337
  199. #define LEFT 331
  200. #define RIGHT 333
  201. #define INS 338
  202. #define DEL 339
  203.  
  204. #define BS 8
  205. #define F1 315
  206. #define F2 316
  207. #define F3 317
  208. #define F4 318
  209. #define F5 319
  210. #define F6 320
  211. #define F7 321
  212. #define F8 322
  213. #define F9 323
  214. #define F10 324
  215.  
  216. #define ALT_A 286
  217. #define ALT_B 304
  218. #define ALT_C 302
  219. #define ALT_D 288
  220. #define ALT_E 274
  221. #define ALT_F 289
  222. #define ALT_G 290
  223. #define ALT_H 291
  224. #define ALT_I 279
  225. #define ALT_J 292
  226. #define ALT_K 293
  227. #define ALT_L 294
  228. #define ALT_M 306
  229. #define ALT_N 305
  230. #define ALT_O 280
  231. #define ALT_P 281
  232. #define ALT_Q 272
  233. #define ALT_R 275
  234. #define ALT_S 287
  235. #define ALT_T 276
  236. #define ALT_U 278
  237. #define ALT_V 303
  238. #define ALT_W 273
  239. #define ALT_X 301
  240. #define ALT_Y 277
  241. #define ALT_Z 272
  242.  
  243. #define CTL_A 1
  244. #define CTL_B 2
  245. #define CTL_C 3
  246. #define CTL_D 4
  247. #define CTL_E 5
  248. #define CTL_F 6
  249. #define CTL_G 7
  250. #define CTL_H 8
  251. #define CTL_I 9
  252. #define CTL_J 10
  253. #define CTL_K 11
  254. #define CTL_L 12
  255. #define CTL_M 13
  256. #define CTL_N 14
  257. #define CTL_O 15
  258. #define CTL_P 16
  259. #define CTL_Q 17
  260. #define CTL_R 18
  261. #define CTL_S 19
  262. #define CTL_T 20
  263. #define CTL_U 21
  264. #define CTL_V 22
  265. #define CTL_W 23
  266. #define CTL_X 24
  267. #define CTL_Y 25
  268. #define CTL_Z 26
  269.  
  270. #define TAB 9
  271. #define BACKTAB 271
  272. #define SHFT_TAB 271
  273.  
  274. #define SHFT_F1 340
  275. #define SHFT_F2 341
  276. #define SHFT_F3 342
  277. #define SHFT_F4 343
  278. #define SHFT_F5 344
  279. #define SHFT_F6 345
  280. #define SHFT_F7 346
  281. #define SHFT_F8 347
  282. #define SHFT_F9 348
  283. #define SHFT_F10 349
  284.  
  285. #define CTL_F1 350
  286. #define CTL_F2 351
  287. #define CTL_F3 352
  288. #define CTL_F4 353
  289. #define CTL_F5 354
  290. #define CTL_F6 355
  291. #define CTL_F7 356
  292. #define CTL_F8 357
  293. #define CTL_F9 358
  294. #define CTL_F10 359
  295.  
  296. #define CTL_HOME  327
  297. #define CTL_END   335
  298. #define CTL_PGUP  339
  299. #define CTL_PGDN  337
  300. #define CTL_LEFT  372
  301. #define CTL_RIGHT 371
  302. #define CTL_UP    328
  303. #define CTL_DOWN  336
  304.  
  305. #define ALT_F1 360
  306. #define ALT_F2 361
  307. #define ALT_F3 362
  308. #define ALT_F4 363
  309. #define ALT_F5 364
  310. #define ALT_F6 365
  311. #define ALT_F7 366
  312. #define ALT_F8 367
  313. #define ALT_F9 368
  314. #define ALT_F10 369
  315.  
  316. #define ALT_1 376
  317. #define ALT_2 377
  318. #define ALT_3 378
  319. #define ALT_4 379
  320. #define ALT_5 380
  321. #define ALT_6 381
  322. #define ALT_7 382
  323. #define ALT_8 383
  324. #define ALT_9 384
  325. #define ALT_0 385
  326.